<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta charset="utf-8" />
        <title>用户登录</title>
        <link rel="stylesheet" href="css/bootstrap.min.css" />
        <link rel="stylesheet" href="css/login.css" />
		<script src="js/jquery-1.11.3.js"></script>
        <script src="js/bootstrap.min.js"></script>
		
    </head>
    <body>
		<!-- 登录的form表单 -->
        <form id="loginUser">
            <div class="mycenter">
	            <div class="mysign">
	                <div class="col-lg-11 text-center text-info">
	                    <h2>欢迎访问</h2>
	                </div>
	                <div class="col-lg-10">
	                    <input type="text" name="userName"  class="form-control" placeholder="请输入账户名" required autofocus/>
	                </div>
	                <div class="col-lg-10">
	                    <input type="password"  name="password" class="form-control" placeholder="请输入密码" required autofocus/>
	                </div>
	                <div style="padding-left: 45px">
	                    <font color="gray">http://www.czxy.com</font>
	                </div>
	                <div style="padding-left: 45px" id="errormsg">
	                	<!-- 此处展示登录账户密码错误信息 -->
	                </div>
	                <div style="padding-left: 45px">
	                	<!-- 此处展示cookie中上次登录时间 -->
						上次登录时间：
	                </div>
	              
	                <div class="col-lg-10">
	                    <button  type="submit" class="btn btn-success col-lg-12" >登录</button>
	                </div>
	            </div>
        	</div>
        </form>
        <script>


                $("#loginUser").submit(function () {

                    var formDate=$("#loginUser").serialize();
                    $.post("/userServlet?methodName=login",formDate,function (result) {
                        console.log(result)
                    },"json");
                    return false;
                })

</script>
    </body>
</html>